<%@ Page Language="VB" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="false" CodeFile="appAffirmation.aspx.vb" Inherits="Admin_appAffirmation" title="Admin - Affirmation Settings" %>
<%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
  <asp:ObjectDataSource ID="AffirmationsObjectDataSource" DataObjectTypeName="Cdm.DataCore.LookupTables.LuAffirmation" TypeName="Cdm.DataCore.LookupTables.LuAffirmation" SelectMethod="ListBySort"
     UpdateMethod="UpdateInstance" InsertMethod="SaveInstance" DeleteMethod="RemoveInstance" SortParameterName="sortExpr" runat="server"></asp:ObjectDataSource>
  
<table cellpadding="0" cellspacing="0">
       <tr><td width="20px" rowspan="4"></td><td>
           <h1><a id="pagecontent">Admin - Affirmation Settings</a></h1></td></tr>
       <tr><td>
                 <cc2:ValidationErrorSummary ID="ErrorSummary" runat="server" Message="" Visible="false" />
       </td></tr>    
       <tr>
          <td>
              <cc2:ScrollingGridView ID="AffirmationsScrollingGridView" runat="server" CssClass="gridOffsetSmall" HorizontalAlign="Center" IsFixedColumn="true" CellPadding="5" Caption="Select/Define the affirmations that will be part of the participant file." CaptionAlign="Top"  Tooltip="170"
            AutoGenerateColumns="False" DataSourceID="AffirmationsObjectDataSource" BorderColor="#21334B" 
            BorderStyle="Solid" GridLines="Vertical" AllowSorting="True" DataKeyNames="AffirmationId">
        <HeaderStyle CssClass="adminHeaderStyle" BackColor="#C3CAD4" BorderColor="#21334B" VerticalAlign="Top" />
        <RowStyle CssClass="adminColumnStyle" />
            <Columns>
                <asp:TemplateField HeaderText="Affirmation" SortExpression="Description">
                <ItemStyle Width="594px" />
                <HeaderStyle Width="600px" />
                    <ItemTemplate><%# Eval("Description") %></ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="AffirmationTextBox" runat="server" Text='<%# Bind("Description") %>' ToolTip="edit description"></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Active" SortExpression="IsActive">
                <ItemStyle Width="125px" />
                <HeaderStyle Width="125px" />
                    <ItemTemplate>
                        <asp:CheckBox ID="ViewActiveCheckBox" runat="server" Enabled="false" Checked='<%#Eval("IsActive") %>' />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                    <EditItemTemplate>
                        <asp:CheckBox ID="EditActiveCheckBox" runat="server" Checked='<%#Bind("IsActive") %>' ToolTip="check if this affirmation is active" />
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:CommandField ShowEditButton="True" HeaderText="Action" AccessibleHeaderText="Action">
                    <ItemStyle HorizontalAlign="Center" Width="75px" />
                    <HeaderStyle Width="105px" />
                </asp:CommandField>
            </Columns>
        <AlternatingRowStyle BackColor="#E8ECF4" /></cc2:ScrollingGridView>
          </td></tr>
          <tr><td>
                <asp:DetailsView ID="AffirmationsDetailsView" runat="server" CssClass="gridOffset" 
            Width="825px" AutoGenerateRows="False" DataSourceID="AffirmationsObjectDataSource" 
            DefaultMode="Insert" GridLines="None" Visible="False">
            <Fields>
                <asp:TemplateField>
                <InsertItemTemplate>
                    <table border="0" cellpadding="3" cellspacing="0">
                        <tr>
                            <td align="right"><asp:Label ID="AffirmationLabel" runat="server" Text="Affirmation Name:" AssociatedControlID="AffirmationDetailsTextBox" CssClass="adminLabel"></asp:Label></td>
                            <td><asp:TextBox ID="AffirmationDetailsTextBox" runat="server" CssClass="text"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="right"><asp:Label ID="ActiveLabel" runat="server" Text="Active?:" CssClass="adminLabel" AssociatedControlID="ActiveCheckBox"></asp:Label></td>
                            <td><asp:CheckBox ID="ActiveCheckBox" runat="server" CssClass="formRadio" Checked="true" /></td>
                        </tr>
                    </table>
                </InsertItemTemplate>
                </asp:TemplateField>
            </Fields>
        </asp:DetailsView>  
          </td></tr>
           </table>

</asp:Content>
<asp:Content ID="FixedContent" runat="server" ContentPlaceHolderID="ContentPlaceHolderFixedAdmin">
        <asp:Button ID="AffirmationAddButton" runat="server" Text="Add Affirmation" />
        <asp:Button ID="SubmitButton" runat="server" Text="Submit" Visible="false" />
    <asp:Button ID="CancelButton" runat="server" Text="Cancel" Visible="false"/>
</asp:Content>

